package com.chaoshan.clients.fallback;

import com.chaoshan.clients.ArticleClient;
import com.chaoshan.entity.Article;
import com.chaoshan.entity.ArticleCollection;
import com.chaoshan.entity.ArticleStar;
import com.chaoshan.util.api.R;
import feign.hystrix.FallbackFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;

/**

/**
 * @author 呱呱
 * @date Created in 2022/5/13 13:41
 */
public class ArticleClientFallbackFactory implements FallbackFactory<ArticleClient> {
    private static final Logger log = LoggerFactory.getLogger(ArticleClientFallbackFactory.class);

    @Override
    public ArticleClient create(Throwable throwable) {
        return new ArticleClient() {
            @Override
            public R<Article> getArticleDetail(Integer articleid) {
                return null;
            }

            @Override
            public R<List<Article>> getArticleList(String accountid) {
                return null;
            }

            @Override
            public R<List<Article>> getDrafts(String accountid, String keyword) {
                return null;
            }

            @Override
            public R<List<Article>> waitPublish(String accountid, String keyword) {
                return null;
            }

            @Override
            public R postArticle(String[] pictures, Article article, String[] tags, String accountid) {
                return null;
            }

            @Override
            public R postProduct(String[] pictures, Article article, String[] tags, String accountid) {
                return null;
            }

            @Override
            public R<List<Article>> vagueSelect(String accountid, String content, String label) {
                return null;
            }

            @Override
            public R starArticleOper(ArticleStar articleStar) {
                return null;
            }

            @Override
            public R collectionUserArticle(ArticleCollection articleCollection) {
                return null;
            }

            @Override
            public R updateArticle(String[] pictures, Article article, String[] tags) {
                return null;
            }
        };
    }
}
